<?php
	require_once($_SERVER["DOCUMENT_ROOT"]."/alerter/modules/security_mod.php");
	require_once($_SERVER["DOCUMENT_ROOT"]."/alerter/modules/watched_mod.php");
	
	SecurityMod::login();
	
	if (!isset($_SESSION["alert_account"])) {
		print('Invalid user');
		SecurityMod::logout();
	}
	
	WatchedMod::addWatched(
		new Watched(
			0,
			v($_REQUEST, "pid"),
			v($_REQUEST, "pilot"),
			v($_REQUEST, "faction"),
			v($_REQUEST, "alliance"),
			$_SESSION["alert_account"]->getName()
		)
	);

?>